gtk4.git
5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 5 Jun 2020 19:25:46 +0000 (19:25 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2048

5 years agomultiselection: Fix the select_range implementation
Matthias Clasen [Fri, 5 Jun 2020 17:49:32 +0000 (13:49 -0400)]
multiselection: Fix the select_range implementation

When exclusive is TRUE, we would not always emit a
::selection-changed signal that covers all the items
that were unselected.

This commit includes a test.

5 years agoset: Fix gtk_set_get_max
Matthias Clasen [Fri, 5 Jun 2020 01:35:53 +0000 (21:35 -0400)]
set: Fix gtk_set_get_max

This function had an off-by-one error. Thankfully,
our selection tests are thorough enough to catch it.

5 years agodropdown: Connect a forgotten signal handler
Matthias Clasen [Fri, 5 Jun 2020 18:26:30 +0000 (14:26 -0400)]
dropdown: Connect a forgotten signal handler

The code was exporting a search_stop function, but
the ui file didn't connect it to the ::stop-search
signal. Fix that.

5 years agoMerge branch 'frame-clock-start-time' into 'master'
Matthias Clasen [Fri, 5 Jun 2020 18:33:48 +0000 (18:33 +0000)]
Merge branch 'frame-clock-start-time' into 'master'

Tweaks to frame clock for better ties to vsync

See merge request GNOME/gtk!2043

5 years agoMerge branch 'master.msvc' into 'master'
Matthias Clasen [Fri, 5 Jun 2020 18:31:08 +0000 (18:31 +0000)]
Merge branch 'master.msvc' into 'master'

Fix latest GTK master on Visual Studio

See merge request GNOME/gtk!2028

5 years agoMerge branch 'columnview-reorder-cells' into 'master'
Matthias Clasen [Fri, 5 Jun 2020 18:29:26 +0000 (18:29 +0000)]
Merge branch 'columnview-reorder-cells' into 'master'

Columnview reorder cells

See merge request GNOME/gtk!2047

5 years agoMerge branch 'rubberband-again' into 'master'
Matthias Clasen [Fri, 5 Jun 2020 17:59:15 +0000 (17:59 +0000)]
Merge branch 'rubberband-again' into 'master'

Rubberband again

See merge request GNOME/gtk!2041

5 years agomultiselection: Fix the select_range implementation
Matthias Clasen [Fri, 5 Jun 2020 17:49:32 +0000 (13:49 -0400)]
multiselection: Fix the select_range implementation

When exclusive is TRUE, we would not always emit a
::selection-changed signal that covers all the items
that were unselected.

This commit includes a test.

5 years agoset: Add a few useful functions
Matthias Clasen [Fri, 5 Jun 2020 01:35:53 +0000 (21:35 -0400)]
set: Add a few useful functions

Allow to find out if a set is empty, and its
min and max.

5 years agocolumnview: Update column positions on reordering
Matthias Clasen [Fri, 5 Jun 2020 16:40:32 +0000 (12:40 -0400)]
columnview: Update column positions on reordering

Tell reordered columns to reorder their cells to
the new position. This is necessary to get things
like separators right. The visible symptom of this
problem was the lack of the right border when the
last column is reorder to another position, since
the title widget was still the last in its container,
so :last-child applied.

5 years agocolumnviewcolumn: Add private api to set the position
Matthias Clasen [Fri, 5 Jun 2020 16:39:48 +0000 (12:39 -0400)]
columnviewcolumn: Add private api to set the position

This is needed to make columns reorder their cells when
their position in the column views list of columns
changes.

5 years agolistitemwidget: Add api to reorder children
Matthias Clasen [Fri, 5 Jun 2020 16:39:00 +0000 (12:39 -0400)]
listitemwidget: Add api to reorder children

We need this to keep the rows in sync with the columns
when they are reordered.

5 years agocolumnviewlayout: Handle for_size propertly
Matthias Clasen [Fri, 5 Jun 2020 15:34:51 +0000 (11:34 -0400)]
columnviewlayout: Handle for_size propertly

When we are given a for_size as width for the whole
column view, we need to distribute it over the columns
as gtk_column_view_allocate_columns would, in order
to find out which for_size to give to each cell.

This is a bit recursive, but works. Since we are
doing this recursion for every row, we should consider
adding a cache for those distributed widths.

5 years agoMerge branch 'wip/damaged-but-no-frost-bite' into 'master'
Ray Strode [Fri, 5 Jun 2020 15:58:37 +0000 (15:58 +0000)]
Merge branch 'wip/damaged-but-no-frost-bite' into 'master'

x11: defer _NET_WM_FRAME_DRAWN update until frame usable by compositor

See merge request GNOME/gtk!1982

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 5 Jun 2020 15:38:03 +0000 (15:38 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

gtk-demo: Bring back the applauncher demo

See merge request GNOME/gtk!2040

5 years agoMerge branch 'ebassi/for-master' into 'master'
Emmanuele Bassi [Fri, 5 Jun 2020 15:29:41 +0000 (15:29 +0000)]
Merge branch 'ebassi/for-master' into 'master'

Add missing annotation

See merge request GNOME/gtk!2046

5 years agocolumnview: Split gtk_column_view_allocate_columns
Matthias Clasen [Fri, 5 Jun 2020 15:24:55 +0000 (11:24 -0400)]
columnview: Split gtk_column_view_allocate_columns

Split off a helper function that just distributes
the widths, without actually allocating the columns.

This will be used in measuring in the future.

5 years agocolumnview: Take column width into account for measuring
Matthias Clasen [Fri, 5 Jun 2020 13:37:59 +0000 (09:37 -0400)]
columnview: Take column width into account for measuring

When measuring the height of a cell, we need to give
it it the width of its column, if we expect realistic
results.

5 years agox11: Defer _NET_WM_FRAME_DRAWN update until frame usable by compositor
Ray Strode [Wed, 27 May 2020 19:12:35 +0000 (15:12 -0400)]
x11: Defer _NET_WM_FRAME_DRAWN update until frame usable by compositor

With the vendor provided Nvidia driver there is a small window of time
after drawing to a GL surface before the updates to that surface
can be used by the compositor.

Drawing is already coordinated with the compositor through the frame
synchronization protocol detailed here:

https://fishsoup.net/misc/wm-spec-synchronization.html

Unfortunately, at the moment, GdkX11Surface tells the compositor the
frame is ready immediately after drawing to the surface, not later,
when it's consumable by the compositor.

This commit defers announcing the frame as ready until it's consumable
by the compositor. It does this by listening for the X server to announce
damage events associated with the frame drawing.  It tries to find the
right damage event by waiting until fence placed at buffer swap time
signals.

5 years agox11: Factor out some of frame sync code into subroutines
Ray Strode [Tue, 2 Jun 2020 20:29:03 +0000 (16:29 -0400)]
x11: Factor out some of frame sync code into subroutines

This commit moves some of the end frame sync counter handling
code to subroutines.

It's a minor readability win, but the main motivation is to
make it easier in a subsequent commit to defer updating the
sync counter until a more appropriate time.

5 years agox11: Add back support for the damage extension
Ray Strode [Wed, 27 May 2020 18:53:10 +0000 (14:53 -0400)]
x11: Add back support for the damage extension

commit 14bf58ec5dfdf19e3ca603b977626608dafc729b dropped support
for using the DAMAGE extension since there was no code that
needed it.

We're going to need it again, however, to address an NVidia
vendor driver issue.

This commit does the plumbing to add it back.

5 years agofilechooserwidget: Avoid an uninitialised value
Timm Bäder [Fri, 5 Jun 2020 04:26:56 +0000 (06:26 +0200)]
filechooserwidget: Avoid an uninitialised value

For NULL filters, we were never calling g_list_store_find, so leaving
filter_index undefined.

5 years agodemos: Avoid shadowing a global from time.h
Timm Bäder [Fri, 5 Jun 2020 04:26:25 +0000 (06:26 +0200)]
demos: Avoid shadowing a global from time.h

Sad but true.

5 years agofilterlistmodel: Fix fallthrough annotations in unreachable code
Timm Bäder [Fri, 5 Jun 2020 04:19:34 +0000 (06:19 +0200)]
filterlistmodel: Fix fallthrough annotations in unreachable code

They are only unreachable in debug builds but still break the build on
clang.

5 years agocolumview: Make cells propagate request mode
Matthias Clasen [Fri, 5 Jun 2020 13:37:21 +0000 (09:37 -0400)]
columview: Make cells propagate request mode

I think this is necessary to make wrapping
labels work.

5 years agogtk-demo: Improve wrapping in settings demo
Matthias Clasen [Fri, 5 Jun 2020 13:35:56 +0000 (09:35 -0400)]
gtk-demo: Improve wrapping in settings demo

The columnview overrides the width of its content,
so if a label is not willing to wrap its content
below a certain width, it will just get cut off.

Avoid that by not setting width-chars on the wrapping
content.

5 years agoAdd missing annotation
Emmanuele Bassi [Fri, 5 Jun 2020 13:33:17 +0000 (14:33 +0100)]
Add missing annotation

5 years agocolumviewlayout: Skip children when we should
Matthias Clasen [Fri, 5 Jun 2020 12:44:23 +0000 (08:44 -0400)]
columviewlayout: Skip children when we should

Every layout manager should call gtk_widget_should_layout
on their children before measuring or allocating them.
So do it here too.

5 years agolistview: Add an example to the docs
Matthias Clasen [Fri, 5 Jun 2020 00:11:35 +0000 (20:11 -0400)]
listview: Add an example to the docs

The example is an excerpt from the applauncher
demo in gtk4-demo.

5 years agogtk-demo: Bring back the applauncher demo
Matthias Clasen [Thu, 4 Jun 2020 19:44:39 +0000 (15:44 -0400)]
gtk-demo: Bring back the applauncher demo

Just without the coverflow. It was a well-documented
demo, so it is useful to keep around.

5 years agoframe clock: schedule in refresh intervals
Yariv Barkan [Sat, 30 May 2020 21:23:24 +0000 (00:23 +0300)]
frame clock: schedule in refresh intervals

When the application does not receive "frame drawn" signals we schedule
the clock to run more or less at intervals equal to the last known
refresh interval. In order to minimize clock skew we have to aim for
exact intervals.

5 years agoframe clock: Better handle non-regular clock cycles
Alexander Larsson [Fri, 5 Jun 2020 09:30:47 +0000 (11:30 +0200)]
frame clock: Better handle non-regular clock cycles

We try to step the frame clock in whole refresh_interval steps, but to
avoid drift and rounding issues we additionally try to converge it to
be synced to the physical vblank (actually the time we get the
frame-drawn message from the compositor, but these are tied together).

However, the convergence to vsync only really makes sense if the new
frame_time actually is tied to the vsync. It may very well be that
some other kind of event (say a network or mouse event) triggered
the redraw, and not a vsync presentation.

We used to assume that all frames that are close in time (< 4 frames
apart) were regular and thus tied to the vsync, but there is really no
guarantee of that. Even non regular times could be rapid.

This commit changes the code to only do the convergence-to-real-time
if the cause of the clock cycle was a thaw (i.e. last frame drawn and
animating). Paint cycles for any other kind of reason are always
scheduled an integer number of frames after the last cycle that was
caused by a thaw.

5 years agoframe clock: Track if paint is caused by thaw or not
Alexander Larsson [Fri, 5 Jun 2020 09:16:57 +0000 (11:16 +0200)]
frame clock: Track if paint is caused by thaw or not

When we get to a paint cycle we now know if this was caused by a
thaw, which typically means last frame was drawn, or some other event.

In the first case the time of the cycle is tied to the vblank in some
sense, and in the others it is essentially random. We can use this
information to compute better frame times. (Will be done in later
commits.)

5 years agoMerge branch 'cleanup-snapshot-inhibit' into 'master'
Benjamin Otte [Fri, 5 Jun 2020 07:38:52 +0000 (07:38 +0000)]
Merge branch 'cleanup-snapshot-inhibit' into 'master'

reftest: Clean up reftest_inhibit_snapshot()

See merge request GNOME/gtk!2034

5 years agoDrop gtk_multi_selection-copy
Matthias Clasen [Fri, 5 Jun 2020 04:15:09 +0000 (00:15 -0400)]
Drop gtk_multi_selection-copy

It is not used anymore.

5 years agolistbase: Redo rubberbanding
Matthias Clasen [Fri, 5 Jun 2020 02:30:47 +0000 (22:30 -0400)]
listbase: Redo rubberbanding

Make it so that the selection is only updated in the end.

5 years agodemos/gtk-demo/listview*.c: Include stdlib.h
Chun-wei Fan [Thu, 4 Jun 2020 08:35:02 +0000 (16:35 +0800)]
demos/gtk-demo/listview*.c: Include stdlib.h

atoi() and qsort() both require this header for them to be defined

5 years agomodules: Fix build on Visual Studio
Chun-wei Fan [Thu, 4 Jun 2020 08:27:56 +0000 (16:27 +0800)]
modules: Fix build on Visual Studio

Visual Studio does not allow decorating functions with '__declspec (dllexport)'
if a prototype exists and is not decorated with '__declspec (dllexport)' as
well, so we cannot just decorate g_io_module_[load|unload|query] in the various
module sources with G_MODULE_EXPORT because the prototypes of these functions
have been marked with _GLIB_EXTERN, which equates to 'extern' unless overridden

Fix this by overriding _GLIB_EXTERN with the appropriate visibility flag, as we
have used to define _GDK_EXTERN.  Unfortunately, we can't just use _GDK_EXTERN
G_MODULE_EXPORT as they may have not been defined yet for our use

Do this across the board for all modules, even if they are not buildable on
Visual Studio nor Windows, for consistency's sake.

5 years agoMerge branch 'fix-quadratic-add' into 'master'
Timm Bäder [Fri, 5 Jun 2020 02:57:38 +0000 (02:57 +0000)]
Merge branch 'fix-quadratic-add' into 'master'

Avoid quadratic slowdown in gtk_widget_add()

See merge request GNOME/gtk!2027

5 years agoAdd gtk_selection_model_[un]select_callback
Matthias Clasen [Fri, 5 Jun 2020 01:33:44 +0000 (21:33 -0400)]
Add gtk_selection_model_[un]select_callback

Add a methods to add or remove a whole set
(specified via a query-range style callback).

5 years agoset: Add a few useful functions
Matthias Clasen [Fri, 5 Jun 2020 01:35:53 +0000 (21:35 -0400)]
set: Add a few useful functions

Allow to find out if a set is empty, and its
min and max.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Thu, 4 Jun 2020 21:17:21 +0000 (21:17 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

more documentation for list widgets

See merge request GNOME/gtk!2039

5 years agoMerge branch 'fribidi-include' into 'master'
Matthias Clasen [Thu, 4 Jun 2020 20:03:13 +0000 (20:03 +0000)]
Merge branch 'fribidi-include' into 'master'

wayland: Remove unused fribidi include

See merge request GNOME/gtk!2037

5 years agodocs: Expand list widget docs
Matthias Clasen [Thu, 4 Jun 2020 19:33:53 +0000 (15:33 -0400)]
docs: Expand list widget docs

Begin to flesh out the long descriptions for GtkListView,
GtkGridView and GtkColumnView.

5 years agowayland: Remove unused fribidi include
Sebastian Keller [Thu, 4 Jun 2020 18:44:55 +0000 (20:44 +0200)]
wayland: Remove unused fribidi include

The included fribidi header is not used in gdkkeys-wayland.c and already
included in gdk.c which causes linker issues due to the header defining
a global variable.

5 years agogtk-demo: Cosmetics
Matthias Clasen [Thu, 4 Jun 2020 17:28:21 +0000 (13:28 -0400)]
gtk-demo: Cosmetics

Remove a few instances of double semicolon.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Thu, 4 Jun 2020 16:32:21 +0000 (16:32 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

gtk-demo: Allow editing in the settings demo

See merge request GNOME/gtk!2033

5 years agoMerge branch 'list-widget-styles' into 'master'
Matthias Clasen [Thu, 4 Jun 2020 16:27:37 +0000 (16:27 +0000)]
Merge branch 'list-widget-styles' into 'master'

List widget styles

Closes #2818

See merge request GNOME/gtk!2035

5 years agoMerge branch 'demo-drop-awards' into 'master'
Matthias Clasen [Thu, 4 Jun 2020 15:27:23 +0000 (15:27 +0000)]
Merge branch 'demo-drop-awards' into 'master'

gtk-demo: Drop the awards

See merge request GNOME/gtk!2036

5 years agoAvoid quadratic slowdown in gtk_widget_add()
Alexander Larsson [Thu, 4 Jun 2020 08:15:03 +0000 (10:15 +0200)]
Avoid quadratic slowdown in gtk_widget_add()

If you add a widget to a parent, this will invalidate the css nodes
for parent/siblings. Afterwards, if the parent is mapped, we will
realize the new child. This calls gtk_widget_update_alpha() which
needs the css opacity, so it revalidates the css.

Thus, for each widget_add (while visible) will trigger a full
revalidation of each sibling. If you add N children to a parent that
leads to O(N^2) revalidations.

To demo this I changed gtk-demo to always double the count
(independent of the fps) and print the time it took. Here is the
results (after a bit):

Setting fishbowl count=256 took 3,4 msec
Setting fishbowl count=512 took 10,1 msec
Setting fishbowl count=1024 took 34,1 msec
Setting fishbowl count=2048 took 126,3 msec
Setting fishbowl count=4096 took 480,3 msec
Setting fishbowl count=8192 took 1892,7 msec
Setting fishbowl count=16384 took 7751,0 msec
Setting fishbowl count=32768 took 38097,7 msec
Setting fishbowl count=65536 took 191987,7 msec

To fix this we drop gtk_widget_update_alpha() and just
calculate it when needed (which is only in a single place).
It was really only necessary because we previously set
the alpha on the surface.

With this fix the above becomes:

Setting fishbowl count=256 took 1,0 msec
Setting fishbowl count=512 took 1,9 msec
Setting fishbowl count=1024 took 3,7 msec
Setting fishbowl count=2048 took 7,4 msec
Setting fishbowl count=4096 took 18,1 msec
Setting fishbowl count=8192 took 31,0 msec
Setting fishbowl count=16384 took 66,3 msec
Setting fishbowl count=32768 took 126,7 msec
Setting fishbowl count=65536 took 244,6 msec
Setting fishbowl count=131072 took 492,2 msec
Setting fishbowl count=262144 took 984,3 msec

5 years agogtk-demo: Drop the awards
Matthias Clasen [Thu, 4 Jun 2020 14:19:44 +0000 (10:19 -0400)]
gtk-demo: Drop the awards

This was a neat idea, but maintaining it at a sufficient
level is too much work.

5 years agolist widgets: Document css structure
Matthias Clasen [Thu, 4 Jun 2020 14:05:17 +0000 (10:05 -0400)]
list widgets: Document css structure

We didn't fill in this expected part of the widget
documentation yet.

5 years agoMerge branch 'ensure-style-no-recurse' into 'master'
Benjamin Otte [Thu, 4 Jun 2020 14:04:55 +0000 (14:04 +0000)]
Merge branch 'ensure-style-no-recurse' into 'master'

Avoid recursion in gtk_css_node_ensure_style()

See merge request GNOME/gtk!2031

5 years agodocs: Fix a parameter name mismatch
Matthias Clasen [Thu, 4 Jun 2020 13:51:07 +0000 (09:51 -0400)]
docs: Fix a parameter name mismatch

5 years agoChange css names of list widget
Matthias Clasen [Thu, 4 Jun 2020 12:42:55 +0000 (08:42 -0400)]
Change css names of list widget

The new names are

GtkListView - listview row
GtkGridView - gridview child
GtkColumView - columnview header
               columnview listview row

Adwaita css has been updated to preserve
existing styles.

Fixes: #2818
5 years agoreftest: Clean up reftest_inhibit_snapshot()
Alexander Larsson [Thu, 4 Jun 2020 13:45:29 +0000 (15:45 +0200)]
reftest: Clean up reftest_inhibit_snapshot()

This was done in a weird way where we always call reftest_uninhibit_snapshot()
on paint, and then re-inhibited it if it wasn't inhibited. To make this
work it also started with an extra inhibit.

This is very contorted and based on how this historically worked. This
changes it to just do:

  if (inhibit_count > 0)
    return;

And keep inhibit_count at its initial zero value unless it is actually
inhibited.

5 years agoMerge branch 'fix-snapshot' into 'master'
Benjamin Otte [Thu, 4 Jun 2020 13:43:44 +0000 (13:43 +0000)]
Merge branch 'fix-snapshot' into 'master'

snapshot: Fix assert if paint gets scheduled immediately

See merge request GNOME/gtk!2032

5 years agogtk-demo: Allow editing in the settings demo
Matthias Clasen [Wed, 3 Jun 2020 23:33:45 +0000 (19:33 -0400)]
gtk-demo: Allow editing in the settings demo

This gives us an example of a columnview with editable
content, which we didn't have so far.

5 years agosnapshot: Fix assert in inhibition
Alexander Larsson [Thu, 4 Jun 2020 10:37:48 +0000 (12:37 +0200)]
snapshot: Fix assert in inhibition

In https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2027 i was getting

Bail out! ERROR:../testsuite/reftests/reftest-snapshot.c:212:reftest_uninhibit_snapshot: assertion failed: (inhibit_count > 0)

In (for example the box-shadow-changes-modify-clip reftest. I can reproduce this (on master) with:

```
$ xvfb-run -a -s "-screen 0 1024x768x24" meson test --suite gtk:reftest "reftest box-shadow-changes-modify-clip.ui"
...
1/1 gtk:reftest / reftest box-shadow-changes-modify-clip.ui ERROR          0.77s
``

Fix this by re-inhibiting if we didn't draw anything, or we will get an assert the next paint.

5 years agoMerge branch 'kjellahl/flowboxremove' into 'master'
Matthias Clasen [Thu, 4 Jun 2020 12:13:57 +0000 (12:13 +0000)]
Merge branch 'kjellahl/flowboxremove' into 'master'

flowbox: Don't use a removed and destroyed child

See merge request GNOME/gtk!2029

5 years agoMerge branch 'fishbowl-children' into 'master'
Matthias Clasen [Thu, 4 Jun 2020 12:10:51 +0000 (12:10 +0000)]
Merge branch 'fishbowl-children' into 'master'

gtk-demo: Avoid list for children in GtkFishBowl

See merge request GNOME/gtk!2030

5 years agoAvoid recursion in gtk_css_node_ensure_style()
Alexander Larsson [Thu, 4 Jun 2020 10:10:31 +0000 (12:10 +0200)]
Avoid recursion in gtk_css_node_ensure_style()

gtk_css_node_ensure_style() recurses over previous siblings to ensure
these have a style before its following sibling.  As seen in
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2027 this can
cause us to stack overflow and crash if we have a lot of children.

And even if we don't have *that* many children its still somewhat
bad to have stack depths of the same magnitude as the number of
children, both for performance reasons and debuggability.

5 years agogtk-demo: Avoid list for children in GtkFishBowl
Alexander Larsson [Thu, 4 Jun 2020 10:06:42 +0000 (12:06 +0200)]
gtk-demo: Avoid list for children in GtkFishBowl

This is a demo that measures performance, so keep the child
info in a hashtable instead of a list. This means adding or removing
a child is not O(n-children).

5 years agoflowbox: Don't use a removed child after it has been unparented
Kjell Ahlstedt [Thu, 4 Jun 2020 09:23:46 +0000 (11:23 +0200)]
flowbox: Don't use a removed child after it has been unparented

In gtk_flow_box_remove(), call g_sequence_remove() before the child is unparented.

See MR !2029

5 years agoMerge branch 'santo/gtk4_spelling_fix' into 'master'
Timm Bäder [Thu, 4 Jun 2020 07:38:58 +0000 (07:38 +0000)]
Merge branch 'santo/gtk4_spelling_fix' into 'master'

docs: Fix spelling of GDK_VERSION_MIN_REQUIRED.

See merge request GNOME/gtk!2026

5 years agoUpdated Spanish translation
Daniel Mustieles [Thu, 4 Jun 2020 07:18:01 +0000 (09:18 +0200)]
Updated Spanish translation

5 years agoUpdated Spanish translation
Daniel Mustieles [Thu, 4 Jun 2020 07:17:16 +0000 (09:17 +0200)]
Updated Spanish translation

5 years agodocs: Fix spelling of GDK_VERSION_MIN_REQUIRED.
Santosh Mahto [Thu, 4 Jun 2020 06:37:22 +0000 (12:07 +0530)]
docs: Fix spelling of GDK_VERSION_MIN_REQUIRED.

5 years agoMerge branch 'columnview-separators' into 'master'
Matthias Clasen [Wed, 3 Jun 2020 23:34:48 +0000 (23:34 +0000)]
Merge branch 'columnview-separators' into 'master'

Columnview separators

See merge request GNOME/gtk!2025

5 years agocolumnview: Add a property for column separators
Matthias Clasen [Wed, 3 Jun 2020 21:34:35 +0000 (17:34 -0400)]
columnview: Add a property for column separators

Rename the show-separators property to show-row-separators,
and add a matching show-column-separators property. It is
implemented by setting the .column-separators style class
on the column view.

5 years agolistview: Use gtk_widget_add_css_class
Matthias Clasen [Wed, 3 Jun 2020 21:36:52 +0000 (17:36 -0400)]
listview: Use gtk_widget_add_css_class

No need to use the style context api for this anymore.

5 years agosettings demo: Don't select rows
Matthias Clasen [Wed, 3 Jun 2020 20:56:19 +0000 (16:56 -0400)]
settings demo: Don't select rows

We want no selection here, so use GtkNoSelection.

5 years agoMerge branch 'columnview-printdialog' into 'master'
Matthias Clasen [Wed, 3 Jun 2020 21:47:58 +0000 (21:47 +0000)]
Merge branch 'columnview-printdialog' into 'master'

Port the printdialog to column view

See merge request GNOME/gtk!2010

5 years agoMerge branch 'columnview-rubberbanding' into 'master'
Matthias Clasen [Wed, 3 Jun 2020 21:46:13 +0000 (21:46 +0000)]
Merge branch 'columnview-rubberbanding' into 'master'

columnview: Implement rubberbanding

See merge request GNOME/gtk!2008

5 years agoMerge branch 'columnview-expand' into 'master'
Matthias Clasen [Wed, 3 Jun 2020 21:39:33 +0000 (21:39 +0000)]
Merge branch 'columnview-expand' into 'master'

columnview: Implement expanding columns

See merge request GNOME/gtk!2007

5 years agoMerge branch 'columnview-reordering' into 'master'
Matthias Clasen [Wed, 3 Jun 2020 21:38:59 +0000 (21:38 +0000)]
Merge branch 'columnview-reordering' into 'master'

columnview: Implement interactive reordering

See merge request GNOME/gtk!2006

5 years agoMerge branch 'columnview-resizing' into 'master'
Matthias Clasen [Wed, 3 Jun 2020 20:04:17 +0000 (20:04 +0000)]
Merge branch 'columnview-resizing' into 'master'

columnview: Implement interactive resizing

See merge request GNOME/gtk!2004

5 years agoMerge branch 'columnview-scrolling' into 'master'
Matthias Clasen [Wed, 3 Jun 2020 19:50:59 +0000 (19:50 +0000)]
Merge branch 'columnview-scrolling' into 'master'

columnview: Implement horizontal scrolling

See merge request GNOME/gtk!1998

5 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Wed, 3 Jun 2020 17:40:26 +0000 (17:40 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

Wip/otte/for master

See merge request GNOME/gtk!2024

5 years agoprintdialog: Port to column view
Matthias Clasen [Sun, 22 Dec 2019 23:09:54 +0000 (18:09 -0500)]
printdialog: Port to column view

5 years agogtk-demo: Make gridview demo use rubberbanding
Matthias Clasen [Mon, 23 Dec 2019 19:57:39 +0000 (14:57 -0500)]
gtk-demo: Make gridview demo use rubberbanding

5 years agoAdd rubberband api
Matthias Clasen [Mon, 23 Dec 2019 19:47:19 +0000 (14:47 -0500)]
Add rubberband api

Add an ::enable-rubberband property to GtkListView,
GtkGridView and GtkColumnView.

5 years agolistbase: Simplify rubberbanding
Matthias Clasen [Wed, 3 Jun 2020 12:20:08 +0000 (08:20 -0400)]
listbase: Simplify rubberbanding

The new approach is:
 - plain: clear and start a new selection
 - extend: add to the existing selection
 - modify: subtract from the existing selection

5 years agolistbase: Split off rubberband data
Matthias Clasen [Tue, 2 Jun 2020 17:37:32 +0000 (13:37 -0400)]
listbase: Split off rubberband data

5 years agolistbase: Use a widget for the rubberband
Matthias Clasen [Tue, 2 Jun 2020 16:42:53 +0000 (12:42 -0400)]
listbase: Use a widget for the rubberband

We no longer need to juggle manual css nodes. Just create
a widget for the rubberband, and update its allocation
as we rubberband.

5 years agoAdd autoscroll
Matthias Clasen [Tue, 2 Jun 2020 15:43:02 +0000 (11:43 -0400)]
Add autoscroll

This is an expected feature with rubberband selection:
as you get close to the edge while doing rubberband
selection, the list scrolls to extend your selection.

5 years agolistbase: Add rubberband selection
Matthias Clasen [Sun, 22 Dec 2019 00:07:11 +0000 (19:07 -0500)]
listbase: Add rubberband selection

Implement the typical rubberband selection, including
autoscroll. This is only useful with multiselection,
and not very compatible with single-click-activate.
Therefore, it is not enabled by default, and needs
to be turned on explicitly.

5 years agoAdd GtkMultiSelection
Matthias Clasen [Mon, 9 Dec 2019 06:19:38 +0000 (01:19 -0500)]
Add GtkMultiSelection

This is implemented using a private GtkSet helper.

Includes tests.

5 years agogtk-demo: Expand columns in the settings demo
Matthias Clasen [Wed, 3 Jun 2020 17:16:14 +0000 (13:16 -0400)]
gtk-demo: Expand columns in the settings demo

Expand the columns that are likely to appear
at the end.

5 years agoinspector: Expand the actions list
Matthias Clasen [Tue, 24 Dec 2019 16:14:37 +0000 (11:14 -0500)]
inspector: Expand the actions list

5 years agoinspector: Expand the resource list
Matthias Clasen [Tue, 24 Dec 2019 16:12:49 +0000 (11:12 -0500)]
inspector: Expand the resource list

This is an experiment with adding a filler column.

5 years agoinspector: Expand the property list
Matthias Clasen [Tue, 24 Dec 2019 16:12:22 +0000 (11:12 -0500)]
inspector: Expand the property list

It looks better this way.

5 years agoinspector: Expand the object tree
Matthias Clasen [Tue, 24 Dec 2019 16:11:51 +0000 (11:11 -0500)]
inspector: Expand the object tree

This is how it used to look, and it looks better that way.

5 years agocolumnview: Take expand into account
Matthias Clasen [Mon, 23 Dec 2019 04:10:46 +0000 (23:10 -0500)]
columnview: Take expand into account

When allocating columns, distribute extra space
to columns that have expand set to TRUE.

5 years agocolumnview: Add a GtkColumnViewColumn:expand property
Matthias Clasen [Mon, 23 Dec 2019 04:10:01 +0000 (23:10 -0500)]
columnview: Add a GtkColumnViewColumn:expand property

This will be used to determine how to distribute
available extra space in a column view.

5 years agocolumnview: Add autoscroll
Matthias Clasen [Sat, 21 Dec 2019 05:24:55 +0000 (00:24 -0500)]
columnview: Add autoscroll

Autoscroll when the pointer gets close to the
edge during column resizing or reordering. This
is similar to what the treeview does, but it is
implemented using a tick callback, and has
variable speed.

5 years agocolumnview: Allow to cancel reorder with Escape
Matthias Clasen [Sat, 21 Dec 2019 00:24:01 +0000 (19:24 -0500)]
columnview: Allow to cancel reorder with Escape

The treeview does this too.

5 years agocolumnview: Interactive column reordering
Matthias Clasen [Fri, 20 Dec 2019 22:29:35 +0000 (17:29 -0500)]
columnview: Interactive column reordering

Allow rearranging columns by dragging, in the same
way the treeview does.

We add the "dnd" style class to the header while
it is dragged, and we move the header of the dragged
column to the end of its parents children, so that
it gets drawn on top.

5 years agocolumnview: Add a GtkColumnView:reorderable property
Matthias Clasen [Wed, 3 Jun 2020 16:57:38 +0000 (12:57 -0400)]
columnview: Add a GtkColumnView:reorderable property

This property controls if users can reorder columns
by drag-and-drop. It defaults to TRUE.